package com.lingo.a2b.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author lingo
 * @since 2020-05-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("a2b_connect_field_relative")
@ApiModel(value="ConnectFieldRelative对象", description="")
public class ConnectFieldRelative implements Serializable {

    private static final long serialVersionUID = 8691138912925257885L;

    @TableId(value = "Fid", type = IdType.AUTO)
    @ApiModelProperty(hidden = true)
    private Integer fid;

    @TableField("Fproject_id")
    @ApiModelProperty(hidden = true)
    private Integer fprojectId;

    @TableField("Flocate_class")
    @NotBlank(message = "所在的className不能为空")
    private String flocateClassName;

    @TableField("Fsrc_field_name")
    @NotBlank(message = "原字段名不能为空")
    private String fsrcFieldName;

    @TableField("Ftarget_field_name")
    @NotBlank(message = "需要转换成的字段名不能为空")
    private String ftargetFieldName;

    @ApiModelProperty(value = "是否为集合类型")
    @TableField("Fis_collection")
    @NotNull(message = "是否为集合类型不能为空")
    private Boolean fisCollection;

    @ApiModelProperty("是否启用")
    @NotBlank(message = "是否启用字段 不能为空")
    private Boolean fenable;

    @ApiModelProperty(value = "转换方案，-1为不转换")
    @TableField("Fvalue_convert_code")
    @NotBlank(message = "转换方案id 不能为空")
    private Integer fvalueConvertId;

    @TableField("Fcreate_time")
    @ApiModelProperty(hidden = true)
    private Date fcreateTime;

    @TableField("Fmodify_time")
    @ApiModelProperty(hidden = true)
    private Date fmodifyTime;


}
